<html>
	{% include "../common_head.html" %}
	<body>
	{% include "../common_menus.html" %}
	
	
	<div id="content">
	
		<div id="rakontu_form_style" class="rakontu_form">
		<form action="/{{dir_manage}}/{{url_character}}
		{% if character %}
			?{{character.urlQuery}}
		{% else %}
			?{{rakontu.urlQuery}}
		{% endif %}
			
		" method="post" enctype="multipart/form-data">

		{% if changes_saved %}
			<div class="message">{{template_changes_saved}}</div>
		{% endif %}
		
		<h3>{{template_name_and_description}}</h3>
		<fieldset>
		<p>{{template_name}}
		<input type="text" name="name" value="{{ character.name }}" maxlength="{{maxlength_name}}"/>
		</p><p>{{template_description}}
			<table style="width:100%; border:none">
			<tr><td class="noborder">
			<textarea name="description" rows="10" cols="60">{{character.description|orNothing}}</textarea>
			</td><td class="noborder" width="80">
			<p>{{template_interpret_as}} {{"interpreting_texts"|tip}}</p>
				<select name="description_format">
				{% for i in text_formats|makeRangeFromListLength %}
					<option value="{{text_formats|listLookup:i}}" 
						{% if text_formats|listLookup:i|equalTest:character.description_format %}
							selected="selected"
						{% endif %}
					>{{text_formats_display|listLookup:i}}</option>
				{% endfor %}
				</select>
			</td></tr></table>
		</p><p>{{template_etiquette_statement}}
			<table style="width:100%; border:none">
			<tr><td class="noborder">
			<textarea name="etiquetteStatement" rows="10" cols="60">{{character.etiquetteStatement|orNothing}}</textarea>
			</td><td class="noborder" width="80">
			<p>{{template_interpret_as}}</p>
				<select name="etiquetteStatement_format">
				{% for i in text_formats|makeRangeFromListLength %}
					<option value="{{text_formats|listLookup:i}}" 
						{% if text_formats|listLookup:i|equalTest:character.etiquetteStatement_format %}
							selected="selected"
						{% endif %}
					>{{text_formats_display|listLookup:i}}</option>
				{% endfor %}
				</select>
			</td></tr></table>
		</fieldset>
			
		<h3>{{template_picture}} {{"character_image"|tip}} 
			{{"uploading_files"|caution}}</h3>
		<fieldset>
		      	<table border="0" cellpadding="4" cellspacing="0">
		      	<tr>
		      		<th>{{template_image}}</th>
		      		<th>{% if character.image %} {{template_replace}} {% else %} {{template_attach}} {% endif %} </th>
		      		<th>{{template_remove}}?</th>
		      		
		      	</tr>
		      	<tr>
					<td>{% if character.image %}
							{{character.imageEmbed}}
						{% else %}
							{{term_none}}
						{% endif %}
						</td>
					<td><input type="file" name="img" size="40" accept="jpg/png"/></p></td>
					<td>{% if character.image %}
							<input type="checkbox" name="removeImage" value="yes" id="removeImage">
							<label for="removeImage">{{template_remove}}</label>
						{% else %}
							&nbsp; 
						{% endif %}</td>
				</tr>
				</table>
		</fieldset>
		
		{% if questions %}
			{% include "../common_questions.html" %}
		{% endif %}
		
      	<p>
    <center><input type="submit" name="changeSettings|{{character.key}}" value="{{button_save_changes}}" class="button"></center>
	</form>	
	</div>
	</div>
	{% include "../common_footer.html" %}
	</body>
</html>
